package top.yokey.shopnc.model;

import top.yokey.base.base.BaseHttpClient;
import top.yokey.base.base.BaseHttpListener;

@SuppressWarnings("ALL")
public class ClassModel {

    private final String ACT = "goods_class";
    private static volatile ClassModel instance;

    public static ClassModel get() {
        if (instance == null) {
            synchronized (ClassModel.class) {
                if (instance == null) {
                    instance = new ClassModel();
                }
            }
        }
        return instance;
    }

    public void index(BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, Thread.currentThread().getStackTrace()[2].getMethodName())
                .get(baseHttpListener);

    }

    public void getChildAll(String gcId, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "get_child_all")
                .add("gc_id", gcId)
                .get(baseHttpListener);

    }

}
